import nodemailer from "nodemailer"
export default function sendEmail(req,res){

    let transporter = nodemailer.createTransport({
        host:"smtp.qq.com",
        port:587,//端口
        secure:false,
        auth:{
            user:"2438080175@qq.com",
            pass:"gmphqkpgnmiiebeh",
        }

    })
    //配置邮件
    let message = {
        from: "2438080175@qq.com",//发送者邮箱
        to: "616228841@qq.com",
        subject: "日常问候",
        text: "123456",
        html: "<p>轰炸信息</p>"
      };
      transporter.sendMail(message,(err,inif)=>{
          if(err){
              console.log(1233333333);
              res.send("发送失败")
          }else{
              console.log(4568888888);
            res.send("发送成功")
          }
      })
}